package Day7;

/**
 * @Author kalista
 * @Description
 * @Date 2020/11/11  14:43
 **/
public class Penguin extends Animal {


    private String name = "dsf";

    public Penguin(String name, int id) {
        super(name, id);
    }

    // 修饰符 4种  2种  public  private  缺省(同包访问)  受保护的(protected)和继承  子类可以调用父类的方法和属性但是没有限制
     void tiaoshui(){
        String name = "王聪聪";
         System.out.println(super.name);
         System.out.println(this.name);
         System.out.println(name);
    }

    public static void main(String[] args) {
        Penguin penguin = new Penguin("abc",12);
        penguin.tiaoshui();
    }
}
